﻿@using DemoSignalRChat.ViewModels
@model UserViewModel

    <div id="groups" class="col-md-2 hidden-xs">
    <h3>Favorites</h3>
    <p id="btn-wall"><a>wall</a></p>
    <p><a>Make money online</a></p>
</div>

    <div id="main-left" class="col-md-5 col-sm-5 col-xs-12">
            @Html.Partial("_FormPost")
            @Html.Action("StatusNewest", "Home", null)
    </div><!--\#main-left-->


    <div id="main-center" class="col-md-3 col-sm-5 hidden-xs">
        <div class="row">
            @Html.Partial("_SuggestAttraction")
        </div>
        <div class="row">            
            @Html.Action("FriendListSuggest", "Home")
        </div>
    </div><!--\#main-center-->


    <div id="main-right" class="col-md-2 hidden-sm hidden-xs">
        <div class="row">
            @Html.Action("GetNewFeeds", new { userId = Model.UserId })
        </div>
        <div class="row">
            @Html.Action("FriendList", "Home")
        </div>
    </div><!--\#main-right-->

    <ul id="notify-bottom-left"></ul>

    <div id="window-chat-list">
    </div>

    @Html.Partial("_PostImages")
    @Html.Partial("Liked")

@section Scripts{

    <!--Reference the SignalR library. -->
    <script src="~/Scripts/jquery.signalR-2.0.0.min.js"></script>
    <!--Reference the autogenerated SignalR hub script. -->
    <script src="~/signalr/hubs"></script>

    <!-- init global variables -->
    <script>
        var userName = '@Model.Displayname';
        var curUserId = '@Model.UserId';
        var curAvatar = '@Model.Avatar';
        var arrImageNames = [];
    </script>

    <script>
        $(document).ready(function () {
            $("#btn-wall").text(userName);
        });
    </script>

    <script src="~/Scripts/myScripts/Chats/server/chathubs.js"></script>

    <script src="~/Scripts/myScripts/Chats/client/onConnected.js"></script>
    <script src="~/Scripts/myScripts/Chats/client/onNewUserConnected.js"></script>

    <script src="~/Scripts/myScripts/Chats/openChatBox.js"></script>
    <script src="~/Scripts/myScripts/Chats/closeChatBox.js"></script>

    <script src="~/Scripts/myScripts/Chats/client/postCastStatus.js"></script>
    <script src="~/Scripts/myScripts/Chats/client/privateMessageReceived.js"></script>

    <script src="~/Scripts/myScripts/Chats/server/postCastStatus.js"></script>
    <script src="~/Scripts/myScripts/Chats/server/sendPrivateMessage.js"></script>

    <script src="~/Scripts/myScripts/Like/client/like.js"></script>
    <script src="~/Scripts/myScripts/Like/server/like.js"></script>
    <script src="~/Scripts/myScripts/Like/client/unlike.js"></script>
    <script src="~/Scripts/myScripts/Like/getPeopleLiked.js"></script>

    <script src="~/Scripts/myScripts/Share/client/share.js"></script>
    <script src="~/Scripts/myScripts/Share/server/share.js"></script>

    <script src="~/Scripts/myScripts/Comment/client/comment.js"></script>
    <script src="~/Scripts/myScripts/Comment/server/comment.js"></script>

    <script src="~/Scripts/myScripts/Chats/client/offChat.js"></script>
    <script src="~/Scripts/myScripts/Chats/client/signOut.js"></script>


    <script src="~/Scripts/myScripts/Chats/server/turnOffChat.js"></script>
    <script src="~/Scripts/myScripts/Chats/server/signOut.js"></script>

    <script src="~/Scripts/myScripts/Chats/replaceURLWithHTMLLinks.js"></script>
    <script src="~/Scripts/myScripts/Chats/replaceEmotion.js"></script>

    <!-- friend -->
    <script src="~/Scripts/myScripts/FriendWaitAccept/friendwaitaccept.js"></script>
    <!-- AddFriend -->
    <script src="~/Scripts/myScripts/FriendAdd/client/addfriend.js"></script>
    <script src="~/Scripts/myScripts/FriendAdd/server/addfriend.js"></script>
    <!-- FriendAccept -->
    <script src="~/Scripts/myScripts/FriendAccept/client/accept.js"></script>
    <script src="~/Scripts/myScripts/FriendAccept/server/accept.js"></script>

    <script src="~/Scripts/myScripts/UploadImage/uploadImage.js"></script>

    <script src="~/Scripts/myScripts/postImage/client/postImage.js"></script>
    <script src="~/Scripts/myScripts/postImage/server/postImage.js"></script>


    <script>
        $(document).ready(function () {

            var request;

            $("#post-status").submit(function () {

                $form = $(this);

                request = $.ajax({
                    url: "/Home/PostLink",
                    type: "POST",
                    data: $form.serialize()
                })
                    .done(function (response, textStatus, jqXHR) {
                        alert("success");
                        console.log(response);
                    })
                    .fail(function (response, textStatus, jqXHR) {
                        alert("error");
                    });

                event.preventDefault();


            });// end submit
        });// end ready

    </script>


    <script src="~/Scripts/myScripts/Search/search.js"></script>



    <script src="~/Scripts/myScripts/Layout/jquery.autosize.js"></script>
    <script>
        // Example:
        $(document).ready(function () {
            $('textarea').autosize();
        });
    </script>



    
    <script src="~/Scripts/myScripts/Wall/wall.js"></script>
    <script src="~/Scripts/myScripts/Status/load_more_status.js"></script>


}